package clothinglibraryenumsredis

type UserInfoEnums struct {
}

var UserInfoEnumsObject UserInfoEnums

const (
	MarryStatusDefault                       = 0 //默认,无异常
	RedisUserInfoMarryStatusOrderMarry       = 1 //订婚状态
	RedisUserInfoMarryStatusCancelOrderMarry = 2 //取消订婚状态
	RedisUserInfoMarryStatusMarried          = 3 //结婚状态
	RedisUserInfoMarryStatusDivorce          = 4 //离婚状态

	UserInfoSoulMate            = "soul_mate"              //知己
	UserInfoSoulMateCancelAt    = "soul_mate_cancel_at"    //知己创建时间
	UserInfoUpdatedAt           = "updated_at"             //更新
	UserInfoBestFriends         = "best_friends"           //死党
	UserInfoBestFriendsCancelAt = "best_friends_cancel_at" //创建死党时间
	UserInfoSecOpenId           = "sec_open_id"            //用户id
	UserInfoNickname            = "nickname"               //用户昵称
	UserInfoAvatarUrl           = "avatar_url"             //用户头像
	UserInfoSex                 = "sex"                    //用户性别
	UserInfoCreatedAtString     = "created_at_string"      //用户创建时间，字符串
	UserInfoCreatedAt           = "created_at"             //用户创建时间时间戳
	UserInfoMarriagePartner     = "marriage_partner"       //用户的结婚对象
	UserInfoMarryStatus         = "marry_status"           //用户的结婚状态
	UserInfoCreateUnix          = "create_unix"            //用户创建时间戳
	UserInfoWinningTotal        = "winning_total"          //累计胜场
	UserInfoTotalScore          = "total_score"            //累计总积分
	UserInfoTotalToken          = "token"                  //token
	UserInfoMarrySuits          = "marry_suits"            //用户结婚套装
	UserInfoCurrentSuitId       = "current_suit_id"        //用户当前套装id
	CurrentElementNos           = "current_element_nos"    //散件编号

	PackageDetailRedisPropTypeClothing = 1
	PackageDetailRedisPropTypeProp     = 2
	PackageDetailRedisPropTypeTools    = 3
)

func (e UserInfoEnums) MarryStatus() []int {
	return []int{
		MarryStatusDefault,
		RedisUserInfoMarryStatusOrderMarry,
		RedisUserInfoMarryStatusCancelOrderMarry,
		RedisUserInfoMarryStatusMarried,
		RedisUserInfoMarryStatusDivorce,
	}
}

func (e UserInfoEnums) MarryStatusMap() map[int]int {
	m := make(map[int]int)
	for _, s := range e.MarryStatus() {
		m[s] = s
	}
	return m
}

func (e UserInfoEnums) MarryStatusString(tag int) string {
	switch tag {
	case MarryStatusDefault:
		return "默认" //
	case RedisUserInfoMarryStatusOrderMarry:
		return "订婚状态" //
	case RedisUserInfoMarryStatusCancelOrderMarry:
		return "取消订婚"
	case RedisUserInfoMarryStatusMarried:
		return "结婚" //
	case RedisUserInfoMarryStatusDivorce:
		return "离婚" //
	default:
		return "未知"
	}
}

//func (e UserInfoEnums) PropType() []int {
//	return []int{
//		MarryStatusDefault,
//		RedisUserInfoMarryStatusOrderMarry,
//		RedisUserInfoMarryStatusCancelOrderMarry,
//		RedisUserInfoMarryStatusMarried,
//		RedisUserInfoMarryStatusDivorce,
//	}
//}
//
//func (e UserInfoEnums) PropTypeMap() map[int]int {
//	m := make(map[int]int)
//	for _, s := range e.MarryStatus() {
//		m[s] = s
//	}
//	return m
//}
//
//func (e UserInfoEnums) PropTypeString(tag int) string {
//	switch tag {
//	case MarryStatusDefault:
//		return "默认" //
//	case RedisUserInfoMarryStatusOrderMarry:
//		return "订婚状态" //
//	case RedisUserInfoMarryStatusCancelOrderMarry:
//		return "取消订婚"
//	case RedisUserInfoMarryStatusMarried:
//		return "结婚" //
//	case RedisUserInfoMarryStatusDivorce:
//		return "离婚" //
//	default:
//		return "未知"
//	}
//}

func (e UserInfoEnums) PropType() []int {
	return []int{
		PackageDetailRedisPropTypeClothing,
		PackageDetailRedisPropTypeProp,
		PackageDetailRedisPropTypeTools,
	}
}

func (e UserInfoEnums) PropTypeMap() map[int]int {
	m := make(map[int]int)
	for _, s := range e.PropType() {
		m[s] = s
	}
	return m
}

func (e UserInfoEnums) PropTypeString(tag int) string {
	switch tag {
	case PackageDetailRedisPropTypeClothing:
		return "服饰" //
	case PackageDetailRedisPropTypeProp:
		return "道具" //
	case PackageDetailRedisPropTypeTools:
		return "工具"
	default:
		return "未知"
	}
}
